package cn.tqfeiyang.springplus.system.request;

import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.tqfeiyang.springplus.framework.validation.*;
import jakarta.validation.constraints.*;
import lombok.Data;
import java.io.Serializable;
import java.util.Set;

/**
 * 用户请求类
 *
 * @author tqfeiyang
 * @since 2024-08-01
 */
@Data
public class UserDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "用户名不能为空", groups = WhenCreate.class)
    @Size(max = 50, message = "用户名长度不能超过50字符")
    @Schema(description = "用户名")
    private String username;

    @NotBlank(message = "密码不能为空", groups = WhenCreate.class)
    @Size(max = 100, message = "密码长度不能超过100字符")
    @Schema(description = "密码")
    private String password;

    @NotBlank(message = "昵称不能为空", groups = WhenCreate.class)
    @Size(max = 50, message = "昵称长度不能超过50字符")
    @Schema(description = "昵称")
    private String nickname;

    @NotBlank(message = "电话不能为空", groups = WhenCreate.class)
    @Size(max = 50, message = "电话长度不能超过50字符")
    @Schema(description = "电话")
    private String phone;

    @NotBlank(message = "邮件不能为空", groups = WhenCreate.class)
    @Size(max = 50, message = "邮件长度不能超过50字符")
    @Schema(description = "邮件")
    private String email;

    //@NotBlank(message = "UUID不能为空", groups = WhenCreate.class)
    @Size(max = 50, message = "UUID长度不能超过50字符")
    @Schema(description = "UUID")
    private String uuid;

    @NotBlank(message = "头像不能为空", groups = WhenCreate.class)
    @Size(max = 50, message = "头像长度不能超过50字符")
    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "简介")
    private String introduction;

    @Schema(description = "是否有效")
    private Boolean enabled;

    @Schema(description = "角色集合")
    private Set<Long> roles;
}